<%--
  User: naim
  Date: Dec 23, 2009
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="/c.tld" %>

<div class="header">
    <%
        String requestURI = request.getRequestURI();
        if (requestURI.contains("latestPrice")) {
            request.setAttribute("noLinkForLatestPrice", true);
        } else if (requestURI.contains("items")) {
            request.setAttribute("noLinkForSubscriptionList", true);
        }
    %>

    <div style="padding-left:3px;padding-right:3px">

        <span style="float:left;text-align:right;">
            <c:choose>
                <c:when test="${noLinkForLatestPrice}"> Latest Price </c:when>
                <c:otherwise> <a href="<c:url value='/stock/latestPrice'/>">Latest Price</a> </c:otherwise>
            </c:choose>
        </span>
        <span style="float:left;text-align:right;">
            &nbsp;|&nbsp;
            <c:choose>
                <c:when test="${noLinkForSubscriptionList}"> Subscription List </c:when>
                <c:otherwise> <a href="<c:url value='/stock/items'/>">Subscription List</a> </c:otherwise>
            </c:choose>            
        </span>

        <span style="float:right;text-align:right;">
            <c:if test="${not empty userEmail}">
                <c:out value="${userEmail}"/>
            </c:if>
            <c:if test="${not empty logoutLink}">
                &nbsp;|&nbsp;<a href="${logoutLink}">Logout</a>
            </c:if>
        </span>        
    </div>
    
    <br>

    <div style="text-align:center;">
        <h2>DSE ALERT!</h2>
        (Your virtual eye on Dhaka Stock Exchange)

    </div>
    
    <hr/>
</div>
